
//

app = new Vue({
	el: '#app',
	data: {
		message: "Vue",
		active : 0,
		provinces: [],
		citys: [],
		currentService: {},
		historyService: {},
		myPatient:[]
	},
	methods: {
		opentMaterialList: function() {
			Akuma.openMaterialList();
		},
		openMobileList: function () {
			Akuma.openMobileList();
		},
		openSelfDoctorList: function() {
			Akuma.openSelfDoctorList();
		},
		openMaterialDetail: function(item) {
			console.log(item.id);
			Akuma.openMaterialDetail(item.id);
		}
	},
	created:function() {
		var _this = this;
		console.log(location.search);
		$$.getJSON(config.path + "a/ed/edeServiceDoctor/app_currentService" + location.search, {_t:new Date().getTime()}, function(data) {
			//console.log(data);
			if(data.status.index == 10000){
				_this.currentService = data.results;
			}

		});
		$$.getJSON(config.path + "a/ed/edeServiceDoctor/app_getHistoryService" + location.search, {_t:new Date().getTime()}, function(data) {
			//console.log(data);
			if(data.status.index == 10000){
				_this.historyService = data.results;
			}

		});
		$$.getJSON(config.path + "a/ed/edeTradeRecord/app_getMyPatient" + location.search.replace("userId","doctorId"), {_t:new Date().getTime()}, function(data) {
			//console.log(data);
			if(data.status.index == 10000){
				_this.myPatient = data.results;
			}

		});
	}
});


